<#macro addXm>
<div id="content_xmxz" style="display: none;">
<style>
.xmxz-container{
    /* border-radius: 3px; */
    -moz-border-radius: 5px;
    /* background-clip: padding-box; */
    width: 594px;
    height: 379px;
    background: #fff;
    /* border: 1px solid #eaeaea; */
    /* box-shadow: 0 0 25px #cac6c6; */
    position: absolute;
    top: 200px;
    left: 30%;
    z-index: 1000;
}
.xmxz-container .title {
    font-family: 微软雅黑;
    font-weight: 500;
    font-size: 20px;
    color: #fff;
    height: 50px;
    background-color: #1C6DC9;
}
.xmxz-container .title span{
    margin-left: 34px;
    position: absolute;
    top: 15px;
}
.xmxz-container .title .close{
    margin-left: 534px;
    margin-top: -5px;
    cursor: pointer;
}
.xmxz-container  .el-input__inner {
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    background-image: none;
    border-bottom: 1px solid #d9d9d9;
    color: #1f2d3d;
    height: 36px;
    float: left;
    padding: 3px 10px;
    width: 298px;
    font-size: 15px;
    margin-top:15px; 
}
.xmxz-container  .el-form-item__img {
	float: left;
    border-bottom: 1px solid #d9d9d9;
    height: 36px;
    padding: 3px 10px;
    margin-left: 27px;
    margin-top:15px; 
}
.xmxz-container .el-button {
    border: 1px solid #bfcbd9;
    color: #fff;
    background-color: #1C6DC9;
    border-color: #1C6DC9;
    margin-right: 240px;
    cursor:pointer;
    width: 102px;
    height: 40px;
    float: right;
    display:none;
}
.xmxz-container .boxs div{
    width: 160px;
    height: 150px;
    border: 2px solid #BBBBBB;
    float: left;
    cursor: pointer;
}
.xmxz-container .boxs .box_1{
	margin: 59px 70px 50px 102px;
}
.xmxz-container .boxs .showImg{
    background-image: url(static/cms/www/default/img/sshd/gray_buss.png);
    display: block;
    width: 45px;
    height: 45px;
    top: 40px;
    position: relative;
    left: 55px;
    border: transparent; 
}
.xmxz-container .boxs .showImg_{
    background-image: url(static/cms/www/default/img/sshd/gray_jishu.png);
    display: block;
    width: 45px;
    height: 45px;
    top: 40px;
    position: relative;
    left: 55px;
    border: transparent; 
}
.xmxz-container .boxs .box_2{
	margin-top: 59px;
}
.xmxz-container  .boxs img {
    float: left;
}
.xmxz-container .boxs span{
    float: left;
    position: relative;
    top: 105px;
    font-size: 16px;
    left: -12px;
    color: #BBBBBB;//#1C6DC9; 
}

</style>
<form  class="xmxz-container">
	<h3  class="title">
	 	<span>添加项目</span>
	 	<span class="close"><img src="static/cms/www/default/img/sshd/close.png" onclick="showmxz()" /></span>
	</h3>
	
	<div  class="el-form-item boxs">
	    <input id="artType" type="hidden" value="" />
		<div class="box_1" isCheck="false" onclick="checkModelStyle()">
 		 <img id="buss_1" style="display: none" src="static/cms/www/default/img/sshd/select.png"/>
		 <div class="showImg"></div>
		 <span id="buss_text">商务创新模式</span>
		</div>
		<div class="box_2"  isCheck="false" onclick="checkModelStyle2()">
		<img id="jishu_1" style="display: none" src="static/cms/www/default/img/sshd/select.png"/>
		<div class="showImg_"></div>
		 <span id="jishu_text">技术创新模式</span>
		</div>
	</div>
	<div  class="el-form-item" style="width: 100%;">
		<!---->
		<div class="el-form-item__content" style="margin-left: 0px;">
			<button  type="button" id="btn_select_model" class="el-button" onclick="selectModel()"><span style="font-size: 16px;">确&nbsp;认</span></button>
			<!---->
		</div>
	</div>
</form>
<script type="text/javascript">
function showmxz () {
	LayerShowWindow('content_xmxz');
}

function checkModelStyle2() {
	var id  = "box_2";
	if($("." + id).attr("isCheck") == "true") {
		 $("." + id).attr("isCheck","false");
		 $(".xmxz-container .boxs .showImg_").css("left","55px");
		  $(".xmxz-container .boxs .showImg_").css("background-image","url(static/cms/www/default/img/sshd/gray_jishu.png)");
		 $(".xmxz-container .boxs #jishu_text").css("top","105px");
		 $(".xmxz-container .boxs #jishu_text").css("left","-12px"); 
		 $(".xmxz-container .boxs #jishu_text").css("color","#BBBBBB");
		 $("." + id).css("border","2px solid #BBBBBB");
		 $("#jishu_1").css("display","none");
		 $("#artType").val('');
	} else {
		 $("." + id).attr("isCheck","true");
		 $(".xmxz-container .boxs .showImg_").css("left","7px");
		  $(".xmxz-container .boxs .showImg_").css("background-image","url(static/cms/www/default/img/sshd/blue_jishu.png)");
		 $(".xmxz-container .boxs #jishu_text").css("top","60px"); 
		 $("." + id).css("border","2px solid #1C6DC9");
		  $(".xmxz-container .boxs #jishu_text").css("left","-15px");
		  $(".xmxz-container .boxs #jishu_text").css("color","#1C6DC9"); 
		 $("#jishu_1").css("display","block");
		 //$("#btn_select_model").css("display","block");
		 $("#artType").val('jsyycx');
		 if($(".box_1").attr("isCheck") == "true") {
			 $(".box_1").attr("isCheck","false");
			 $(".box_1").css("border","2px solid #BBBBBB");
		     $(".xmxz-container .boxs .showImg").css("left","55px");
		      $(".xmxz-container .boxs .showImg").css("background-image","url(static/cms/www/default/img/sshd/gray_buss.png)");
		     $(".xmxz-container .boxs #buss_text").css("top","105px");
		      $(".xmxz-container .boxs #buss_text").css("color","#BBBBBB"); 
		     $(".xmxz-container .boxs #buss_text").css("left","-12px"); 
		     $("#buss_1").css("display","none");
		 }
	}
		
	if($("#artType").val() != "") {
		$("#btn_select_model").css("display","block");
	} else {
		$("#btn_select_model").css("display","none");
	}
}

function checkModelStyle() {
debugger
	var id  = "box_1";
	if($("." + id).attr("isCheck") == "true") {
		 $("." + id).attr("isCheck","false");
		 $(".xmxz-container .boxs .showImg").css("left","55px");
		 $(".xmxz-container .boxs .showImg").css("background-image","url(static/cms/www/default/img/sshd/gray_buss.png)");
		 $(".xmxz-container .boxs #buss_text").css("top","105px");
		 $(".xmxz-container .boxs #buss_text").css("left","-12px"); 
		 $(".xmxz-container .boxs #buss_text").css("color","#BBBBBB");
		  $("." + id).css("border","2px solid #BBBBBB");
		 $("#buss_1").css("display","none");
		 $("#artType").val('');
	} else {
		 $("." + id).attr("isCheck","true");
		 $(".xmxz-container .boxs .showImg").css("left","7px");
		 $(".xmxz-container .boxs .showImg").css("background-image","url(static/cms/www/default/img/sshd/blue_buss.png)");
		 $(".xmxz-container .boxs #buss_text").css("color","#1C6DC9");
		  $("." + id).css("border","2px solid #1C6DC9");
		 $(".xmxz-container .boxs #buss_text").css("top","60px"); 
		  $(".xmxz-container .boxs #buss_text").css("left","-15px"); 
		 $("#buss_1").css("display","block");
		 $("#artType").val('swmscx');
		 if($(".box_2").attr("isCheck") == "true") {
		 	  $(".box_2").attr("isCheck","false");
		 	   $(".xmxz-container .boxs .showImg_").css("background-image","url(static/cms/www/default/img/sshd/gray_jishu.png)");
		      $(".xmxz-container .boxs .showImg_").css("left","55px");
		      $(".xmxz-container .boxs #jishu_text").css("top","105px");
		      $(".xmxz-container .boxs #jishu_text").css("color","#BBBBBB");
		      $(".box_2").css("border","2px solid #BBBBBB");
		      $(".xmxz-container .boxs #jishu_text").css("left","-12px"); 
		 	  $("#jishu_1").css("display","none");
		 }
	}
	
	if($("#artType").val() != "") {
		$("#btn_select_model").css("display","block");
	} else {
		$("#btn_select_model").css("display","none");
	}
}

function selectModel()
{
    var artType = $("#artType").val();
	if(artType == "") {
		$.alert("请选择模式！");
		return;
	}
	//ajax异步提交  
	$.ajax({
		type : "POST",
		url : "matchManager.do?sshdCsXmModel&sshdId=${(matchProject.id)!}",
		data : {'artType' : artType}, //序列化               
		error : function(request) { // 设置表单提交出错 
			$.alert('选择模式异常！'); 
		},
		success : function(data) {
			var d = data;
			if (d.success) {
				showmxz();
				window.location.href = "matchManager.do?"+d.obj+"&artType="+artType+"&sshdId=${(matchProject.id)!}&matchProArticleId=" + d.attributes.matchProArticleId;
			} else {
				if(d.success != undefined) {
					$.alert(d.msg)
				} else {
					window.location.href = "cms.action?skip&navCode=sshdXq&sshdId=${(matchProject.id)!}&subNav=ssbm";
				}
			}
			
		}
	});
}
</script>
</div>
</#macro>